<!--
 * @Author: your name
 * @Date: 2020-08-04 20:29:31
 * @LastEditTime: 2020-08-05 12:16:37
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \H52002-VueMobile-accp\honeybud\src\components\common\loading.vue
-->
<template>
    <div class="loading">
        <img src="../../assets/loading/loading-0.gif" class="image-top" v-if="loadingType === 1">
        <img src="../../assets/loading/loading-0.gif" class="image-center" v-else>
    </div>
</template>

<script>
    export default {
        props: {
            loadingType: {    //1-靠近顶部加载   2-居中加载
                type: Number,
                default: 1
            }
        }
    }
</script>

<style lang="stylus" type="text/scss" scoped>
    .loading {
        position: relative;
        width: 100%;
        height  4rem
        z-index:999
        img {
            width:1.2rem;
            &.image-top{
                position: absolute;
                left: 50%;
                top: 200px;
                margin-left: -80px;
            }
            &.image-center{
                position: absolute;
                left: 50%;
                top: 50%;
                transform: translate(-50%, -50%);
            }
        }
    }
</style>
